<?php
/**
 * @file
 * Returns the HTML for a single Drupal page.
 *
 * Complete documentation for this file is available online.
 * @see https://drupal.org/node/1728148
 */
global $theme_path;
$node = menu_get_object();
?>
<div id="page">
    <?php print render($page['help']); ?>
    <header class="header" id="header" role="banner">
        <div class="wrapper">

            <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" class="header__logo" id="logo">
                <img src="/<?php echo path_to_theme();?>/logo-stylebook.png" alt="<?php print t('Home'); ?>" class="header__logo-image" />
            </a>

            <?php print render($page['header']); ?>
            <?php print render($page['navigation']); ?>

        </div>
    </header>
    <?php print $messages; ?>

    <?php if ($title): ?>
    <h1 class="page__title title element-invisible" id="page-title"><?php print $title; ?></h1>
    <?php endif; ?>

    <?php print render($page['highlighted']); ?>

    <div id="main">
        <div id="content" class="column region-content" role="main">
            <article class="app" data-nid="<?php echo $node->nid; ?>">
                <div class="section-left">
                    <div class="wrapper">
                        <?php print $breadcrumb; ?>
                        <?php print render($title_prefix); ?>
                        <?php print render($title_suffix); ?>
                        <?php print render($tabs); ?>
                        <?php if ($action_links): ?>
                        <ul class="action-links"><?php print render($action_links); ?></ul>
                        <?php endif; ?>

                        <div class="article-top">
                            <?php echo jessica_thm_author_author_section($node); ?>
                            <div class="article-share">
                                <div class="article-share-amount">
                                    <?php if (!empty($node->field_social_count)): ?>
                                        <strong><?php print $node->field_social_count['und'][0]['value']; ?></strong>
                                    <?php else: ?>
                                        <strong>0</strong>
                                    <?php endif; ?>SHARES</div>
                                <div class="article-share-action">
                                    <a href="#" class="article-share-open icon icon-share"></a>
                                    <a href="#" class="article-share-close icon icon-cross"></a>
                                    <a href="#" class="article-share-icon icon icon-facebook" target="_blank"></a>
                                    <a href="#" class="article-share-icon icon icon-sina" target="_blank"></a>
                                    <a href="#" class="article-share-icon icon icon-pinterest" target="_blank"></a>
                                    <a href="#" class="article-share-icon icon icon-email"></a>
                                    <button class="article-share-toggle">SHARE</button>
                                </div>
                            </div>

                        </div>
                        <div class="field-body">
                            <?php echo render_(field_view_field('node', $node, 'field_msw_image', array('label' => 'hidden', 'settings' => array('image_style' => 'medium')))); ?>
                            <?php echo render_(field_view_field('node', $node, 'body', array('label' => 'hidden'))); ?>
                            <?php $body =  render_(field_view_field('node', $node, 'field_body', array('label' => 'hidden'))); ?>
                            <?php $body .=  render_(field_view_field('node', $node, 'field_award_history', array('label' => 'hidden'))); ?>
                            <?php $b = trim(strip_tags($body));?>
                            <?php if (!empty($b)): ?>
                                <h3 class="profile-title">簡歷</h3>
                            <?php endif;?>
                            <?php echo $body;?>
                        </div>
                        <?php echo bck_render_('msw-related-articles');?>
	                    <?php //print render($page['fb_comments']);
							//print _get_block('scmedia_fb_comment','facebook_comment');
						?>


                        <div class="article-readmore">
                            <a href="#">Read More</a>
                        </div>
                    </div>
                </div>

                <div class="section-right">
                    <div class="wrapper">
                        <?php
                            $sidebar_first  = render($page['sidebar_first']);
                            if ($sidebar_first) {
                                print $sidebar_first;
                            }
                        ?>
                    </div>
                </div>
            </article>
            <div id="article-loading"></div>
        </div>
    </div>
    <?php //print render($page['below_content']); ?>
    <?php print render($page['bottom']); ?>
    <?php print render($page['footer']); ?>

</div>

<?php print render($page['popup']); ?>
<?php print render($page['overlay']); ?>
<?php print render($page['hidden']); ?>
